﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using NDepot.Validations;

namespace NDepot.Models.UI
{
    public class ProductInput
    {
        [HiddenInput(DisplayValue = false)]
        public string Id { get; set; }

        [RequiredAttribute]
        [StringLength(20, MinimumLength=10)]
        public string Title { get; set; }

        [RequiredAttribute]
        public string Description { get; set; }

        [RequiredAttribute]
        [ImageUrl]
        public string ImageUrl { get; set; }

        [RequiredAttribute]
        [Range(0.01, 999999)]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:C}")]
        public decimal Price { get; set; }

    }
}